package com.example.akr_webservices.controller;

import com.example.akr_webservices.Dto.DtoAkrData;
import com.example.akr_webservices.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ApiController {
    @Autowired
    DataService dataService;

    @RequestMapping("/api/last")
    @ResponseBody
    public DtoAkrData Last() {
        return dataService.GetLastData();
    }
}